'''
This file is part of ModeliMark.

ModeliMark is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.

ModeliMark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with ModeliMark.
If not, see <http://www.gnu.org/licenses/>.

Copyright 2011 Jens Frenkel
'''

import numbers 

class BaseWrapper(object):
    '''
    classdocs
    '''

   
    def __init__(self):
        '''
        Constructor
        '''
        
    def open(self, model, files):
        '''
        instructs the compiler to open the Modelica 
        code and return, the implementation is only necesarry
        if the compiler uses a window 
        
        :param model: Name of the Model to flatten.
        :type model: String.   
             
        :param files: all Files of the Model.
        :type files: list of String.             
        '''        
        assert(isinstance(model,str))
        assert(isinstance(files,list))        
        
        return None, 0.0
        
    def flatten(self, model, files):
        '''
        instructs the compiler to parse the Modelica 
        code and return the flat model
        
        :param model: Name of the Model to flatten.
        :type model: String.   
             
        :param files: all Files of the Model to flatten.
        :type files: list of String.             
        '''        
        assert(isinstance(model,str))
        assert(isinstance(files,list))
        
        raise NotImplementedError
    
    def translate(self, model, files):
        '''
        flattens the model and turns it into a state which can be simulated
        
        :param model: Name of the Model to flatten.
        :type model: String.   
             
        :param files: all Files of the Model to flatten.
        :type files: list of String. 
        '''         
        assert(isinstance(model,str))
        assert(isinstance(files,list))
        
        raise NotImplementedError  
    
    def simulate(self, model, files, startTime, outputInterval, stopTime):
        '''
        flattens, translates and simulates the model using the standard solver
        and a predefined output interval and stop time
        
        :param model: Name of the Model to flatten.
        :type model: String.   
             
        :param files: all Files of the Model to flatten.
        :type files: list of String. 
        
        :param startTime: Start Time of the Simulation
        :type startTime: numbers.Real.
                
        :param outputInterval: Intervall for Output of Results.
        :type outputInterval: numbers.Real. 
        
        :param stopTime: Stop Time of the Simulation
        :type stopTime: numbers.Real. 
        '''         
        assert(isinstance(model,str))
        assert(isinstance(files,list))
        assert(isinstance(startTime,numbers.Real))
        assert(isinstance(outputInterval,numbers.Real))
        assert(isinstance(stopTime,numbers.Real))
        
        raise NotImplementedError       
                

        
          
        
        
        